<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        #back {
            width: 52px;
            height: 52px;
            border-radius: 50%;
            border: 1px solid rgb(80, 79, 79);
            background-color: white;
            position: fixed;
            bottom: 10px;
            right: 10px;
            z-index: 999;
            display: none;
            cursor: pointer;
        }

        .shang {
            display: block;
            font-size: 30px;
            color: black;
            line-height: 52px;
            text-align: center;
        }
    </style>
</head>

<body>
    <div id="back"><span class="shang iconfont icon-chevron-thin-up" onclick="back()"></span></div>

</body>

</html>
<script>
    window.onscroll = function () {
        var back = document.getElementById("back");

        var scroll_top = document.body.scrollTop || document.documentElement.scrollTop;
        if (scroll_top > 180) {
            back.style.display = "block";
        } else {
            back.style.display = "none";
        }
    };
    function back() {
        scrollTo({
            top: 0,
            behavior: "smooth",
        })
    }



</script>